Skip to content

Blocks: Specify apiVersion in registerBlockType#1031

Merged
n7studios merged 2 commits intomainfrom
blocks-use-api-version
Feb 25, 2026
Merged

Blocks: Specify apiVersion in registerBlockType#1031
n7studios merged 2 commits intomainfrom
blocks-use-api-version

Conversation

@n7studios
Copy link
Contributor

@n7studios n7studios commented Feb 24, 2026

Summary

#982 and #985 upgraded the Plugin's blocks to the block apiVersion 2 and 3 respectively, depending on the WordPress version. However, this is insufficient, as registerBlockType must also specify the apiVersion, which this PR resolves.

Screenshot 2026-02-24 at 14 36 56

registerBlockType does support passing the metadata object loaded from our block.json definitions, which will be addressed in a future PR when our JS build work extends to the backend scripts.

Testing

Existing tests pass.

Checklist

@n7studios n7studios self-assigned this Feb 24, 2026
@n7studios n7studios added the bug label Feb 24, 2026
@github-actions
Copy link

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team February 24, 2026 08:04
@n7studios n7studios marked this pull request as ready for review February 25, 2026 09:16
Copy link

@ciccio-kit ciccio-kit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅

@n7studios n7studios merged commit d36f619 into main Feb 25, 2026
228 of 233 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants